{$CLEO .ep}
//gear.ep//

4@ = 1
while true
    003D:
    if 
        player.Defined($PLAYER_CHAR)
    then
        if 
            actor.Driving($PLAYER_ACTOR)
        then
            0811: 8@ = actor $PLAYER_ACTOR car_nosave
            08EC: 10@ = car 8@ type 
            if
                 10@ == 3
            then
                0AB8: get_vehicle 8@ current_gear_to 5@
                if and
                    5@ > 1
                    5@ < 4
                then
                    4@ = 1
                    continue
                end
                if
                    803B: not 5@ == 4@
                then
                    if
                        001D: 5@ > 4@
                    then
                        0085: 4@ = 5@
                        0A97: 7@ = car 8@ struct
                        7@ += 0x22 
                        0A8D: 7@ = read_memory 7@ size 2 virtual_protect 0
                        7@ *= 4
                        7@ += 0xA9B0C8
                        0A8D: 7@ = read_memory 7@ size 4 virtual_protect 0
                        7@ += 0x5C                                        
                        0A8D: 7@ = read_memory 7@ size 4 virtual_protect 0
                        7@ += 0x48
                        0A8D: 1@ = read_memory 7@ size 4 virtual_protect 0
                        7@ += 4
                        0A8D: 2@ = read_memory 7@ size 4 virtual_protect 0
                        7@ += 4
                        0A8D: 3@ = read_memory 7@ size 4 virtual_protect 0
                        if
                            actor.DrivingVehicleType($PLAYER_ACTOR, #BANSHEE)
                        then
                            9@ = 60.0
                        else
                            9@ = 0.0
                        end
                        066C: 6@ = attach_particle "GUNFLASH" to_car 8@ with_offset 1@ 2@ 3@ rotation 9@ -90.0 0.0 type 1
                        064C: make_particle 6@ visible
                        064F: remove_references_to_particle 6@
                        0A97: 7@ = car 8@ struct
                        7@ += 0x384
                        0A8D: 7@ = read_memory 7@ size 4 virtual_protect 0
                        7@ += 0xCC // modelFlags
                        0A8D: 7@ = read_memory 7@ size 4 virtual_protect 0
                        if
                            08B7: test 7@ bit 13
                        then
                            1@ *= -1.0
                            9@ *= -1.0
                            066C: 6@ = attach_particle "GUNFLASH" to_car 8@ with_offset 1@ 2@ 3@ rotation 9@ -90.0 0.0 type 1 
                            064C: make_particle 6@ visible
                            064F: remove_references_to_particle 6@
                        end     
                        audiostream.PerformAction(0@, PLAY)
                        audiostream.LinkToCar(0@, 8@)
                    else
                        0085: 4@ = 5@
                    end
                end
            else
                4@ = 1
            end            
        else
            4@ = 1
        end
    else
        4@ = 1
    end
end